package com.liuguang.testassert.security;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;

/**
 * @ClassName: MyPasswordEncoder
 * @Description：
 * @Author: wanghr
 * Date: 3:18 PM 2020/6/1
 * Version: 1.0
 */

//@Component
@Slf4j
public class MyPasswordEncoder implements PasswordEncoder {
    @Override
    public String encode(CharSequence rawPassword) {
        log.info("传入的密码：{}",rawPassword);

        return "hhhhhhhh";
    }

    @Override
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        log.info("传入参数rawPassword：{}",rawPassword);
        log.info("参数encodedPassword：{}",encodedPassword);
        return true;
    }
}
